<!-- Begin Nav -->
<?php if(!empty($navs) ):?>
<nav>
	<ul class="clearfix">
		<?php foreach($navs as $k => $v):?>
			<?php 
			$url = $this->webroot;
			switch($v['Category']['type']) {
				case 'page':
					$url .= 'pages/detail/' . $v['Category']['id'];
					break;
					
				case 'course':
					$url .= 'courses';
					break;
				
				case 'test':
					$url .= 'tests';
					break;
				
				case 'video':
					$url .= 'videos';
					break;
					
				case 'askexpert':
					$url .= 'experts';
					break;
					
				case 'register':
					$url .= 'users/register';
					break;

				case 'news':
					$url .= 'news';
					break;
			}
		?>
			<li<?= !empty($category['Category']) && $category['Category']['id'] == $v['Category']['id'] ? ' class="active"' : '' ?>><a href="<?=  $url ?>"><?= $v['Category']['name'] ?></a></li>
		<?php endforeach; ?>
	</ul>
</nav>
<?php endif;?>
<!-- End Nav -->